# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=drupalscan
pkgver=0.5.2
pkgrel=15
groups=('blackarch' 'blackarch-webapp' 'blackarch-scanner')
pkgdesc='Simple non-intrusive Drupal scanner.'
arch=('any')
url='https://rubygems.org/gems/DrupalScan/'
license=('custom:unknown')
depends=('ruby')
makedepends=('ruby')
options=('!strip')
source=("https://rubygems.org/downloads/DrupalScan-$pkgver.gem")
sha512sums=('10380d240cf3c3dd6e72d31938e9c5ceebbbd5103ea8c852affa0b2bede54ba0fc8dd760827648564446d777c5bdd64dca9d32549495c2620971fd004d141faf')

package() {
  _gemdir="$(ruby -e'puts Gem.default_dir')"

  gem install --no-user-install -n "$pkgdir/usr/bin" -i "$pkgdir/$_gemdir" \
    DrupalScan*.gem

  mv "$pkgdir/usr/bin/DrupalScan" "$pkgdir/usr/bin/$pkgname"
}

